import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RouterModule, Routes} from '@angular/router';
import {FormsModule,} from '@angular/forms';
import {ScrollingModule} from '@angular/cdk/scrolling';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {SysComponent} from './sys.component';


const routes: Routes = [
  {
    path: 'sys',
    component: SysComponent,
    /*canActivateChild: [PermissionGurid],*/
    children: [
      {path: 'welcome', loadChildren: () => import('./welcome/welcome.module').then(m => m.WelcomeModule)},
      {path: 'dept', loadChildren: () => import('./dept/dept.module').then(m => m.DeptModule)},
      {path: 'role', loadChildren: () => import('./role/role.module').then(m => m.RoleModule)},
    ]
  }

];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    ScrollingModule,
    NgZorroAntdModule,
    RouterModule.forChild(routes)
  ],
  exports: [
    RouterModule,
    SysComponent
  ],
  declarations: [SysComponent],
})
export class sysModule {
}
